package com.hzw.saas.common.security.pojo.dto;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * token携带信息
 *
 * @author zzl
 * @since 12/21/2020
 */
public class SaasUser extends User {

    private static final long serialVersionUID = 1297939813942294416L;

    @Getter
    @Setter
    private String userId;

//    @Getter
//    @Setter
//    private String realName;
//
//    @Getter
//    @Setter
//    private String phoneNo;
//
//    @Getter
//    @Setter
//    private String email;
//
//    @Getter
//    @Setter
//    private Integer type;
//
//    @Getter
//    @Setter
//    private List<String> roles;

    public SaasUser(String userId, String username, String phoneNo, String email, Integer type, String password, boolean enable, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enable, true, true, true, authorities);
        this.userId = userId;
//        this.phoneNo = phoneNo;
//        this.email = email;
//        this.type = type;
    }

}
